(function (fruit, global, undefined) {
    var document = global.document;
    var userAgent, result;
    userAgent = navigator.userAgent;
    var ie = (result = userAgent.match(/MSIE (\d+)\./)) && result[1];
    fruit.support = (function () {
        var sup, temp, style, result = {};
        var support = {
            addEventListener:document.addEventListener,
            dispatchEvent:document.dispatchEvent,
            XDomainRequest:global.XDomainRequest,
            getBoundingClientRect:document.documentElement.getBoundingClientRect,
            crossDomain:global.XDomainRequest || global.XMLHttpRequest,
            onmousewheel:'onmousewheel' in document,
            iePropertychange:ie && ie < 9,
            w3cChange:!ie || ie > 8,
            w3cFocus:!ie || ie > 8,
            w3cInput:!ie || ie > 9
        };
        //detect
        temp = document.createElement('div');
        style = temp.style;
        style.cssText = "opacity:.55";
        support['getComputedStyle'] = global.getComputedStyle
        support['innerText'] = 'innerText' in temp;
        support['firstElementChild'] = 'firstElementChild' in temp;
        support['cssFloat'] = 'cssFloat' in style;
        support['opacity'] = (/^0.55$/).test(style.opacity);
        support['filter'] = 'filter' in style;
        support['cssFloat'] = 'cssFloat' in style;
        support['removeProperty'] = 'removeProperty' in style;
        support['remove']='remove' in temp;
        //Save the exist:
        for (sup in support) {
            if (support[sup]) {
                result[sup] = !!support[sup];
            }
        }
        support = null;
        return result;
    }());
}(fruit, window, undefined));
